#ifndef _PING_DRIVER
#define _PING_DRIVER

#define CR1_CEN_Set                 ((u16)0x0001)
#define CR1_CEN_Reset               ((u16)0x03FE)

#define METERS_PER_SECOND   343
#define MIN_PULSE_WIDTH     115
#define MAX_PULSE_WIDTH     18500
#define PING_TIMEOUT        0x7FFF
#define BAD_PING_READING    0xFFFF

// some common reading values for comparisons
extern u16 CM_READINGS[100];


u16 PingPin(GPIO_TypeDef* GPIO_Port, u16 GPIO_Pin );
u16 convertTimeToCM(u16 usec);

#endif